import request from '@/utils/request'

// 查询企业的部门列表
export const reqGetDepartments = () => request({
  method: 'GET',
  url: '/company/department'
})

// 根据ID删除部门
export const reqDelDepartments = (id) => request({
  method: 'DELETE',
  url: `/company/department/${id}`
})

// 新增部门
export const reqAddDepartments = data => request({
  method: 'post',
  url: '/company/department',
  data
})

// 根据ID查询部门详情
export const ReqGetDepartDetail = id => request({
  url: `/company/department/${id}`
})

// 根据ID修改部门详情
export const reqUpdateDepartments = data => request({
  method: 'PUT',
  url: `/company/department/${data.id}`,
  data
})
